package myapp.com.myapplication;

import android.os.Bundle;

import com.xm.httpapi.Annotation.Layout;
import com.xm.httpapi.BaseUtils.Toast;
import com.xm.httpapi.BaseView.BaseNewActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import myapp.com.myapplication.view.CommonInputItem;

@Layout(R.layout.activity_main)
public class MainActivity extends BaseNewActivity {

    @BindView(R.id.com)
    CommonInputItem commonInputItem;

    @Override
    protected void initData(Bundle savedInstanceState) {
        initView();
    }

    @Override
    protected String showTitle() {
        //不想显示就传null
        return "";
    }

    private void initView() {
        ButterKnife.bind(this);
        commonInputItem.setOnClickListener(v -> Toast.show("点击了"));
    }

    @OnClick(R.id.btn_request)
    void request() {
        intent(RequrstActivity.class);
    }

    @OnClick(R.id.btn_mvp_request)
    void requestMvp() {
        intent(RequestMvpActivity.class);
    }
}
